<template>
    <div class="index">
        <Nav></Nav>
        <Swiper></Swiper>
        <div class="index-box">
            <Trans></Trans>
            <Trip></Trip>
            <Lou></Lou>
            <Reservation></Reservation>
            <CheckMore></CheckMore>
            <LeaveName @show="show"></LeaveName>
            <Whatsapp></Whatsapp>
        </div>
        <Bottom @show="show"></Bottom>
        <CustomPopup v-model:show="visible" ref="popRef"></CustomPopup>
    </div>
</template>
    
<script setup lang='ts'>
import Nav from "@/views/pages/index/Mobile/components/Nav/index.vue"
import Swiper from "@/views/pages/index/Mobile/components/Swiper/index.vue"
import Trans from "@/views/pages/index/Mobile/components/Trans/index.vue"
import Trip from "@/views/pages/index/Mobile/components/Trip/index.vue"
import Lou from "@/views/pages/index/Mobile/components/Lou/index.vue"
import Reservation from "@/views/pages/index/Mobile/components/Reservation/index.vue"
import LeaveName from "@/views/pages/index/Mobile/components/LeaveName/index.vue"
import Bottom from "@/views/pages/index/Mobile/components/Bottom/index.vue"
import Whatsapp from "@/views/pages/index/Mobile/components/Whatsapp/index.vue"
import CheckMore from "@/views/pages/index/Mobile/components/CheckMore/index.vue"
import CustomPopup from "@/views/components/CustomPopup/index.vue"
import type { SubmitForm } from "~/api/interface/site"
const popRef = ref<InstanceType<typeof CustomPopup> | null>(null)
const visible = ref(false)
const show = (form:SubmitForm)=>{
    if(form) {
        popRef.value?.acceptParams(form)
    }
    visible.value = true
}
</script>
    
<style scoped lang="scss">
@import "./index.scss";
</style>